<h4>Milestone List of <?= $projects['name']?> </h4>
<small><a id="milestone"><i class="icon-plus"></i> New Milestone</a></small>
<table width="100%" id="example" class="table table-hovered">
<thead>
  <tr>
    <th>Name</th>
    <th>Description</th>   
    <th>Action</th>  
  </tr>
  </thead>
  <?php foreach($default_milestones as $default_milestone) {?>
  <tr>
    <td><?= $default_milestone->name?></td> 
    <td><?= $default_milestone->desc?></td> 
        
    <td><a href="#">Tasks Groups</a> <a href="#"><i class="icon-edit"></i></a> <a href="#"><i class="icon-trash"></i></a></td>    
  </tr>
  <?php }?>
  <?php foreach($milestones as $milestone) {?>
  <tr>
    <td><?= $milestone->name?></td> 
    <td><?= $milestone->desc?></td> 
     <td><a href="#">Tasks Groups</a> <a href="#"><i class="icon-edit"></i></a> <a href="#"><i class="icon-trash"></i></a></td>

  </tr>
  <?php }?>
</table>

<hr  />
<div style="display:none" class="new_milestone">
<h3>Create New Milestone</h3>
<?= form_open('user/tasks/create_milestone/'.$projects['id'])?>
<table class="table-condensed" width="100%">
  <tr>
    <td>Project Name</td>
    <td>
    <input type="text" readonly="readonly" value="<?= $projects['name']?>" />
     <input type="hidden" readonly="readonly" value="<?= $projects['id']?>" name="project_id" />
    </td>
    <td class="text-error">&nbsp;</td>
  </tr>
  <tr>
    <td>Milestone Name</td>
    <td><input type="text" name="name" value="<?=set_value('name')?>" /></td>
    <td class="text-error"><?= form_error('name')?></td>
  </tr>
  <tr>
    <td>Description</td>
    <td><textarea name="desc"><?=set_value('desc')?></textarea></td>
    <td class="text-error"><?= form_error('desc')?></td>
  </tr>
  
    <tr>
    <td>&nbsp;</td>
    <td><input type="submit" value="Create Milestone" class="btn btn-info" /></td>
    <td></td>
  </tr>
</table>
</form>
</div>

<script type="text/javascript">
$('#milestone').click(function(){
	$('.new_milestone').show(500);
	
	})
</script>


